package com.hiyee.enums;

/**
 * 验证码场景枚举类
 *
 * @author WangBin
 */
public enum SmsCodeSceneEnum {
    LOGIN("LOGIN", "手机短信验证码登录"),
    ;

    private String value;
    private String name;

    SmsCodeSceneEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    /**
     * 判断数值是否属于枚举类的值
     *
     * @param value
     * @return
     */
    public static boolean exist(String value){
        boolean include = false;
        for (SmsCodeSceneEnum e: SmsCodeSceneEnum.values()){
            if(e.getValue().equals(value)){
                include = true;
                break;
            }
        }
        return include;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
